<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>打字机效果</title>
  <style>
    div {
      overflow: hidden;
      font-size: 20px;
      width: 0;
      height: 30px;
      background-color: cornsilk;
      white-space: nowrap;
      animation: typewriter 5s steps(16) forwards;
    }

    @keyframes typewriter {
      0% {
        width: 0;
      }
      100% {
        width: calc(22px * 16);
      }
    }
  </style>
</head>
<body>
  <div>钓鱼岛是中国的，台湾是中国的一个省</div>
</body>
</html>